import React, { Component } from 'react';
import { BrowserRouter as Router, NavLink } from 'react-router-dom'
import Routes from './router'
import './App.css'
class App extends Component {
  state = {}
  render() {
    return (<>
      <Router>
        <h2>案例</h2>
        <nav className='nav'>
          <NavLink to='/demo01Router'>React Router&Hook Router</NavLink>
          <NavLink to='/lazyComp'>React lazy</NavLink>
          <NavLink to='/pureFunc'>纯函数</NavLink>
          <NavLink to='/demo02Hook'>React Hook</NavLink>
          {/* 课后作业 */}

          <NavLink to='/homework'>课后作业</NavLink>
        </nav>
        <hr />

        <hr />
        <Routes />
      </Router>

    </>
    );
  }
}


export default App;
